<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=utf-8"><LINK 
href="img_files/pop.css" type=text/css rel=stylesheet>
<STYLE type=text/css>BODY {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
A {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
TABLE {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
DIV {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
SPAN {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
TD {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
TH {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
INPUT {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
SELECT {
	FONT: 9pt "宋体", Verdana, Arial, Helvetica, sans-serif
}
BODY {
	PADDING-RIGHT: 5px; PADDING-LEFT: 5px; PADDING-BOTTOM: 5px; PADDING-TOP: 5px
}
</STYLE>

<SCRIPT language=JavaScript>
var parentWin;
var mode;
var ctlType;
var editObj;

function ok() {
	if (ctlName.value=="") {
		alert("请填写标识！");
		return;
	}
	if (ctlTitle.value=="") {
		alert("请填写名称！");
		return;
	}
	if (mode=="create")
		parentWin.CreateMacroCtl(ctlType, ctlName.value, ctlTitle.value, defaultValue.value, macroType.value, "宏控件：" + macroType.options(macroType.selectedIndex).text);
	else {
		editObj.name = ctlName.value;
		editObj.title = ctlTitle.value;
		editObj.value = "宏控件：" + macroType.options(macroType.selectedIndex).text;
		editObj.setAttribute("macroType", macroType.value);
		editObj.setAttribute("macroDefaultValue", defaultValue.value);
	}
	window.close();
}

function window_onload() {
	parentWin =	dialogArguments[0];
	mode = dialogArguments[1];
	if (mode=="create")
		ctlType = dialogArguments[2];
	else {
		editObj = dialogArguments[2];
		ctlName.value = editObj.name;
		ctlTitle.value = editObj.title;
		defaultValue.value = editObj.getAttribute("macroDefaultValue");
		macroType.value = editObj.getAttribute("macroType");
	}
}

function openWin(url,width,height)
{
  var newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=50,left=120,width="+width+",height="+height);
}

function setSequence(id, name) {
	ctlTitle.value = name;
	defaultValue.value = id;
}
</SCRIPT>
</HEAD>
<BODY bgColor=menu onLoad="window_onload()">
<TABLE width="293" border=0 align=center cellPadding=0 cellSpacing=0>
  <TBODY>
  <TR>
    <TD height="28" align=center>控件字段：</TD>
    <TD height="28" align=left><input name="ctlName" type="text" style="width: 200px; height:22px" maxlength="30"></TD>
  </TR>
  <TR>
<TD width="86" height="28" align=center>控件名称：</TD>
<TD width="207" height="28" align=left><input type="text" name="ctlTitle" style="width: 200px; height:22px"></TD>
  </TR>
  
  <TR>
    <TD width="86" height="28" align=center>默&nbsp;认&nbsp;值：</TD>
    <TD width="207" height="28" align=left><input type="text" name="defaultValue" style="width: 200px; height:22px"></TD>
  </TR>
  <TR>
    <TD height="28" align=center>类&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;型：</TD>
    <TD height="28" align=left>
	<select name="macroType" id="macroType" onChange="if(this.options[this.selectedIndex].value=='macro_flow_sequence') openWin('../../flow/flow_sequence_sel.jsp', 300, 40);">
      <option value="macro_current_user">当前用户</option>
      <option value="macro_user_select">用户列表</option>
      <option value="macro_idea">意见框</option>
      <option value="macro_sign">签名框</option>
      <option value="macro_vehicle_select">车辆牌照选择框</option>
      <option value="macro_driver_select">司机选择框</option>
      <option value="macro_dept_select">部门选择框</option>
      <option value="macro_customer_list_win">客户选择窗体</option>
      <option value="macro_linkman_list_win">联系人选择窗体</option>
      <option value="macro_provider_list_win">供应商选择窗体</option>
      <option value="macro_product_list_win">产品选择窗体</option>
      <option value="macro_product_service_list_win">服务型产品选择窗体</option>
	  <option value="macro_flow_sequence">表单中的序列号</option>
    </select></TD>
  </TR>
  <TR>
    <TD colspan="2" align=center><input name="submit" type=submit id=Ok onClick=ok() value=确定>
&nbsp;&nbsp;
<input name="button" type=button onClick=window.close(); value=取消></TD>
  </TR>
</TBODY></TABLE>
</BODY>
</HTML>
